<?php

/*
* Front end plugin extension to manage application initialization
*/
require_once('Zend/Controller/Plugin/Abstract.php');

require_once('Myzen/log/Executiontime.php');

/**
 * Plugin to save the execution time of each query
 * 
 * @uses Zend_Controller_Plugin_Abstract
 */
class Myzen_Controller_Plugin_Executiontime extends Zend_Controller_Plugin_Abstract
{

    
  /**
   * Constructor
   *
   * @param  config
   * @return void
  **/
	public function __construct($config)
	{
		$instance = Myzen_Log_Executiontime::getInstance();
		$instance->setConfig($config);
	}

	public function dispatchLoopShutdown()
    {
		Myzen_Log_Executiontime::getInstance()->saveTime();
    }
  

} // end initialization helper